/**
 * Author(s): xuming.Wong <xuming.Wong@gmail.com>
 */

#ifndef __GlobalVariables_H__
#define __GlobalVariables_H__

#include "PQClientPrerequisites.h"

namespace PQClient
{
	/*Singleton class that manage all global variables.
	*/
	class GlobalVariables
	{
	public:
		/*Index into the in32 array.
		*/
		enum Int32VarId
		{
			Int32_LoginServerId,
			Int32_LoginAreaId,
			Int32_LoginMode,//first login

			//Add new just above this line
			Int32_Var_Count
		};

	public:
		static GlobalVariables& getSingleton()
		{
			static GlobalVariables inst;
			return inst;

		}
		
		/*Set int32 type globals.
		*/
		void setInt32(Int32VarId id,int32 value);

		int32 getInt32(Int32VarId id);

	protected:
		int32 _int32Vars[Int32_Var_Count];

	};

}

#define Globals PQClient::GlobalVariables::getSingleton()
#endif
